<?php

class iUrl implements iController {
	public $request;
	
	function __construct(){
		foreach($_REQUEST as $name=>$val){
			$this->__set($name, $val);
		}
	}
	
	public function __set($request, $value){
		$this->$request = $value;
	}
	
	public function &__get($request){
		return $this->$request;
	}
	
	function makeClean($stringurl) {
		$url=parse_url($stringurl);
		$strurl = basename($url['path'],".php");
		$qstring = parse_str($url['query'],$vars);
		while(list($k,$v) = each($vars)) $strurl .= "/".$v;
		return $strurl;
   }
}

?>
